package com.ceshiren.chnjx.wework.exception_handle;

import org.openqa.selenium.WebDriver;

import java.util.ArrayList;

/**
 * @author JJJJ
 * @Title: exceptionHandler
 * @date 2021/11/8下午7:35
 * @Description: 异常统一处理
 */
public abstract class ExceptionHandler {
    public static int currentRetryTime = 0;
    public static final int MAX_RETRY_TIME = 3;

    public abstract boolean isHit(String pageSource);

    public abstract void handle(WebDriver driver);


    public static ArrayList<ExceptionHandler> getAllException(){
        ArrayList<ExceptionHandler> exceptionHandlers = new ArrayList<>();
        exceptionHandlers.add(
                new PopupExceptionHandler()
        );
        return exceptionHandlers;
    }
}
